﻿<!DOCTYPE html>
<html>
<head>
    <title>Homework</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/bootstrap/css/bootstrap.min.css")" rel="stylesheet">
    <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/bootstrap.min.js")" type="text/javascript" ></script>
    <script src="@Url.Content("~/Scripts/bootbox.min.js")" type="text/javascript" ></script>
    <script src="@Url.Content("~/Scripts/knockout.js")" type="text/javascript" ></script>
    <script src="@Url.Content("~/Scripts/viewmodels.js")" type="text/javascript" ></script>
</head>
<body>
    <div class="navbar navbar-default navbar-static-top" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="@Url.Action("Index", "Home")" >Homework Hub</a>
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li></li>
                    <li>@Html.ActionLink("Offene Hausaufgaben", "Open", "Homework")</li>
                    <li>@Html.ActionLink("Alle Hausaufgaben", "All", "Homework")</li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    @{ 
                        if (ViewBag.CurrentUser == null)
                        {
                            <li style="padding-top: 8px;">
                            @Html.Partial("ViewLoginControl")
                            </li>
                        } else {
                            Dbz.HomeworkHub.Frontend.Models.CurrentUserModel cum = ViewBag.CurrentUser as Dbz.HomeworkHub.Frontend.Models.CurrentUserModel;
                            <li class="dropdown">
                              <a href="#" class="dropdown-toggle" data-toggle="dropdown">@String.Format("{0}, {1}", cum.Nachname, cum.Vorname)<b class="caret"></b></a>
                              <ul class="dropdown-menu">
                                <li><a href="#">Meine Hausaufgabe</a></li>
                                <li><a href="#">Von mir erstelle Lösungen</a></li>
                                <li class="divider"></li>
                                <li><a href="#">Mein Zugang</a></li>
                                <li>
                                    @Html.ActionLink("Administration", "Index", "Admin")
                                </li>
                                <li class="divider"></li>
                                <li>
                                    @Html.ActionLink("Abmelden", "Logout", "Account")
                                </li>
                              </ul>
                            </li>
                        }
                    }
                </ul>



            </div>
            <!--/.nav-collapse -->
        </div>
    </div>
    <div class="page">
        <div class="innerPage">
            <div class="innerPage2">
                <div class="headerArea">
                </div>
                <div class="smallDevider"></div>
                <div id="main">
                    @RenderBody()
                </div>
            </div>
        </div>
    </div>
    <div id="footer">
        Copyright (c) 2013 by Division By Zero. Alle Rechte vorbehalten!
    </div>
</body>


<script type="text/javascript">

    $(document).ready(function () {
        // DataBinding durchführen
        ko.applyBindings(model);
    });

</script>

</html>
